package com.jeesite.modules.aliyun.oss.bean;

import com.aliyun.oss.OSSClient;
import jline.internal.Log;
import lombok.Data;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

@Configuration
@Data
public class AliyunOSS {
    private OSSClient ossClient;



    @Value("${oss.endPoint}")
    private String endpoint;

    @Value("${oss.accessKeyId}")
    private String accessKeyId;

    @Value("${oss.accessKeySecret}")
    private String accessKeySecret;


    @Bean("ossClients")
    public OSSClient ossClient(){
      return  new OSSClient(endpoint, accessKeyId, accessKeySecret);
    }
}